package cn.hchaojie.camp.week1.qa;

import org.junit.Test;

public class TestRectangle {
	@Test
	public void test() {
		Rectangle rect1 = new Rectangle(4, 40);
		Rectangle rect2 = new Rectangle(3.8, 35.9);
		
		printRect(rect1);
		printRect(rect2);
	}
	
	private void printRect(Rectangle rect) {
		System.out.println("矩形：" + rect);
		System.out.println("周长：" + rect.getPerimeter());
		System.out.println("面积：" + rect.getArea());
	}
}
